package com.jic.member.controller.manage;

import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.member.request.MemberVipRequest;
import com.jic.member.response.MemberVipResponse;
import com.jic.member.service.MememberVipBaseService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("memberVip")
public class MemberVipController {
    @Autowired
    private MememberVipBaseService mememberVipBaseService;
    @ApiOperation("列表查询")
    @ResponseBody
    @RequestMapping("queryList")
    public RestResult<PageResult<MemberVipResponse>> queryList(@RequestBody MemberVipRequest request) {
        return mememberVipBaseService.queryPage(request);
    }

    @ApiOperation("新增列表")
    @RequestMapping("addMemberVipInfo")
    public RestResult<Long> addMemberVipInfo(@RequestBody MemberVipRequest request){
        return mememberVipBaseService.insert(request);
    }

    @ApiOperation("删除列表")
    @RequestMapping("delMemberVip")
    public RestResult<Long> delMemberVip(@RequestBody MemberVipRequest param){
        return mememberVipBaseService.delete(param);
    }

    @ApiOperation("修改列表")
    @RequestMapping("editMemberVip")
    public RestResult<Long> editMemberVip(@RequestBody MemberVipRequest param){
        return mememberVipBaseService.update(param);
    }

}
